<?php
/**
 * Klasse für Projekte
 */
class Model_RelProjectsUser extends Zend_Db_Table_Abstract
{
    /** Table name */
    protected $_name = 'rel_projects_user';
    /** Primary Key */
    protected $_primary = 'relid';
    
	public function createRel($data) {
    	    	
    	$lastinsert_id = parent::insert($data);
    	return $lastinsert_id;
    	
    }
    
    public function deleteRelsByProjectID($pid) {
    	
    	$rows_deleted = $this->delete($this->getAdapter()->quoteInto('pid = ?',$pid));
    	return $rows_deleted;
    	
    }
    
	public function deleteRelsByUserID($uid) {
    	
    	$rows_deleted = $this->delete($this->getAdapter()->quoteInto('uid = ?',$uid));
    	return $rows_deleted;
    	
    }
    
};

?>